package 文件流;

import java.io.IOException;
import java.io.InputStream;
import java.util.Scanner;

public class Demo {
    public static void main(String[]args){
        //Scanner in=new Scanner(System.in);
        InputStream is=System.in;//从键盘输入
        byte[]zf=new byte[10];
        try {
            int x=is.read();
            is.skip(3);//skip：跳过字符
            //is.close();
            is.mark(1);
            int y=is.read(zf,2,3);
            System.out.println(x+"-----"+y);
            for (int i=0;i<zf.length;i++){
                System.out.print( (char) zf[i]+",");
            }
            is.reset();
            y=is.read(zf,2,6);
            System.out.println(x+"-----"+y);
            for (int i=0;i<zf.length;i++){
                System.out.print( (char) zf[i]+",");
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
